//
//  ViewController.m
//  按钮指定区域点击
//
//  Created by 崔博 on 2018/6/21.
//  Copyright © 2018年 崔博. All rights reserved.
//

#import "ViewController.h"
#import "CustomButton.h"
@interface ViewController ()
{
    CustomButton * button;
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    button = [[CustomButton alloc] initWithFrame:CGRectMake(100, 100, 120, 120)];
    button.backgroundColor = [UIColor blueColor];
    [button addTarget:self action:@selector(doAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
    
    self.view.backgroundColor = [UIColor whiteColor];
}


- (void)doAction:(id)sender{
    NSLog(@"click");
}


@end
